<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2017/10/30
  Time: 12:30
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<title>资源树</title>
<body>
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-content text-center">
                    <ul id="tree" class="ztree">
                    </ul>
                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
    zTree.init('tree','${ctx}/resource/tree',{
        data: {
            key: {
                name: "resourceName"
            },
            simpleData: {
                enable: true,
                idKey: "id",
                pIdKey: "resourcePid",
                rootPId: "0"
            }
        },
        onDblClick:function (event, treeId, treeNode) {
            //回写选中节点数据到父页面
            parent.getParentResource(treeNode);
            Dialog.closeFrame(window.name);
        }
    });
</script>
</body>

